function getCook(nom) {
		deb = document.cookie.indexOf(nom + "=")
		if (deb >= 0) {
			deb += nom.length + 1
			fin = document.cookie.indexOf(";",deb)
			if (fin < 0) fin = document.cookie.length
			return unescape(document.cookie.substring(deb,fin))
			}
		return 0
}

function setCook(nom,valeur,jours) {
        var expDate = new Date()
        expDate.setTime(expDate.getTime() + (jours * 24 * 3600 * 1000))
        document.cookie = nom + "=" + escape(valeur)
            + ";expires=" + expDate.toGMTString()
}